#ifndef SceneSynthesis_h
#define SceneSynthesis_h

#include "sceneGraph/ggroup.h"
#include "sceneGraph/Scene.h"
#include "sceneGraph/Model.h"
#include "sceneGraph/ExtractGroups.h"

#define SceneSyn_PREPROCESSING


struct CandidateType
{
	int heightIndex;
	int widthIndex;
	string tag;
	string groupName;
	float probability;
	CandidateType()
	{
		heightIndex=widthIndex=-1;
		tag="";
		groupName="";
		probability=0.0f;
	}

	bool operator < (CandidateType *const candidate) const
	{
		return probability<candidate->probability;
	}

	bool operator > (CandidateType * const candidate) const
	{
		return probability>candidate->probability;
	}
};

void ConstructCandidates(map<string,WallGrid> &gridMap,vector<CandidateType*> &candidateVector,map<string,CandidateType*> &candidateMap);

void GenerateNewScenes(vector<Scene*> &sceneVector,Scene *scene,vector<CandidateType*> &candidateVector , map<string,vector<GGroup*>*> &groupMap);

#ifdef SceneSyn_PREPROCESSING
void DoSceneSynethesis();
void ClearAllMem();
#endif

#endif